1. Field of the Invention
This invention relates to a moving picture coding system wherein a quantizer is controlled by the amount of generated bits.
2. Description of the Related Art
In a conventional moving picture coding system, a quantization step size is controlled in accordance with the amount of generated bits as disclosed, for example, in xe2x80x9cA Study on Control Method for Low Bit Rate Video Codingxe2x80x9d, Collection of Drafts D-311 for the Spring National Meeting of the Electronic Information Communications Society in 1990.
The conventional moving picture coding system disclosed is shown in block diagram in FIG. 4. Referring to FIG. 4, the moving picture coding system shown includes a generated bit amount calculation section 14 which calculates and supplies a generated bit amount I to a quantization variation value calculation section 15 by way of a signal line 20. The quantization variation value calculation section 15 first multiplies the generated bit amount I received by way of the signal line 20 and a first differential value (differential value of a generated bit amount between different frames) Ixe2x80x2 of the generated bit amount I by a sensitivity coefficient to calculate a variation value xcex94Q of a quantization step size and sends the thus calculated variation value xcex94Q to a quantization determination section 16 by way of a signal line 21. The quantization determination section 16 adds the quantization variation value received by way of the signal line 21 to a quantization step size of the last frame to determine a new quantization step size for a current frame and sends the thus determined quantization step size to a coding section 17 by way of a signal line 22. The coding section 17 performs coding using the quantization step size thus received by way of the signal line 22.
In the conventional moving picture coding system described above, the quantization step size is determined only based on a quantitative value of a generated bit amount with equal sensitivity for any scene, without considering the scene contents whether the active images with a great amount of motion accordingly attach greater importance to the motion smoothness than to the image clarity or the still images with a small amount of motion accordingly attach greater importance to the image clarity than to the motion smoothness. Therefore, where the sensitivity of the quantization step size to the variation of the bit amount is low, in active frames with a great amount of motion, the variation of the quantizer is so low that dropped or missing frames are increased, resulting in loss of motion smoothness, but in still frames with small motion, much time is required until the quantization step size is reduced low and consequently the image clarity does not rise rapidly.
On the contrary where the sensitivity of the quantization step size to the variation of the bit amount is high, the quantizer varies in response to a small amount of variation of the bit amount, and consequently, the quantizer step size is unstable. In this manner, where the quantization step size is determined only based on a bit amount, it is difficult to determine a sensitivity coefficient adaptively for any scene.
It is an object of the present invention to provide a moving picture coding system which allows moving pictures to be observed subjectively easily whether frames of the moving pictures attach great importance to the motion smoothness or the image clarity.
In order to attain the object described above, according to the present invention, there is provided a moving picture coding system which includes a quantizer for quantization processing, which comprises generated bit amount calculation means for calculating a generated bit amount for each coded frame, quantization variation value calculation means for calculating a quantization variation value which is a variation of a quantization step size from the generated bit amount calculated by the generated bit amount calculation means, variation value correction frame determination means for determining a frame as a frame for which correction of the quantization variation value should be performed when the frame involves a large amount of motion and the quantization variation value is positive in sign or when the frame involves a small amount of motion and the quantization variation value is negative in sign, variation value correction means for correcting, for a frame which is determined as a frame for which correction should be performed by the variation value correction frame determination means, the quantization variation value calculated by the quantization variation value calculation means so as to increase the variation of the quantizer, and quantization determination means for adding the quantization variation value corrected by the variation value correction means to a quantization step size of the last frame to calculate a new quantization step size for a current frame.
The variation value correction frame determination means may include moving block determination means for calculating the sum of the absolute values of differential signals between the last frame and the current frame for each block to determine moving blocks, moving block number calculation means for calculating the number of moving blocks based on the results of determination of the moving block determination section for each block, and correction frame determination means for determining a frame as a frame for which correction of the quantization variation value should be performed when the number of moving blocks of the frame calculated by the moving block number calculation section is higher than a predetermined threshold value for a moving frame and the quantization variation value calculated by the quantizer variation value calculation section is positive in sign or when the number of moving blocks is lower than a predetermined threshold value for a stationary frame and the quantization variation value is negative in sign.
Where the moving picture coding system further comprises a motion compensation interframe prediction section, the variation value correction frame determination section may include moving block number calculation means for counting the number of blocks whose motion vector is determined to be a non-zero vector by the motion compensation interframe prediction section, and correction frame determination means for determining a frame as a frame for which correction of the variation value should be performed when the number of moving blocks calculated by the moving block number calculation section is higher than a predetermined threshold value for a moving frame and the quantization variation value calculated by the quantization variation value calculation section is positive in sign or when the number of moving blocks is lower than a predetermined threshold value for a stationary frame and the quantization variation value is negative in sign.
In the moving picture coding system, where the quantization variation value calculated by the quantization variation value calculation means is represented by xcex94Q, the variation value correction means corrects the quantization variation value xcex94Q so that it may be increased in absolute value. The variation value xcex94Q is corrected when the frame is a moving frame and xcex94Q greater than 0 or when the frame is a stationary frame and xcex94Q less than 0. Consequently, in active frames with a large amount of motion, a coarser quantization step size is selected to achieve smooth motion. But in the still frames with a small amount of motion, a finer quantization step size is selected to get image clarity.
Since the variation value of the quantization step size is corrected in accordance with scene contents and a quantizer is controlled adaptively depending upon whether the scene attaches great importance to the motion smoothness or to the image clarity and subjective image quality is improved.
The above and other objects, features and advantages of the present invention will become apparent from the following description and the appended claims, taken in conjunction with the accompanying drawings in which like parts or elements are denoted by like reference characters. dr
FIG. 1 is a block diagram of a moving picture coding system showing a first preferred embodiment of the present invention;
FIG. 2 is a block diagram of another moving picture coding system showing a second preferred embodiment of the present invention;
FIG. 3 is a block diagram of a further moving picture coding system showing a third preferred embodiment of the present invention; and
FIG. 4 is a block diagram showing a conventional coding system.